// 动态路由：需要权限的
// 将需要权限管理的路由单独抽离出来
/* Layout */
import Layout from '@/layout'
export default [
  {
    path: '/departments',
    meta: {},
    name: 'departments',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/departments/index.vue'),
        meta: { title: 'departments', icon: 'tree' }
      }
    ]
  },
  {
    path: '/employees',
    name: 'employees',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/employees/index.vue'),
        meta: { title: 'employees', icon: 'people' }
      },
      {
        path: 'import',
        component: () => import('@/views/employees/import.vue'),
        hidden: true
      },
      {
        path: 'details/:id',
        component: () => import('@/views/employees/details.vue/'),
        hidden: true
      }
    ]
  },
  {
    path: '/setting',
    name: 'setting',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/setting/index.vue'),
        meta: { title: 'setting', icon: 'setting' }
      }
    ]
  },
  {
    path: '/salary',
    name: 'salary',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/salarys/index.vue'),
        meta: { title: 'salarys', icon: 'money' }
      }
    ]
  },
  {
    path: '/social',
    name: 'social',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/social/index.vue'),
        meta: { title: 'social', icon: 'table' }
      }
    ]
  },
  {
    path: '/attendances',
    name: 'attendances',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/attendances/index.vue'),
        meta: { title: 'attendances', icon: 'skill' }
      }
    ]
  },
  {
    path: '/approvals',
    name: 'approvals',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/approvals/index.vue'),
        meta: { title: 'approvals', icon: 'tree-table' }
      }
    ]
  },
  {
    path: '/permissions',
    name: 'permissions',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/permission/index.vue'),
        meta: { title: 'permission', icon: 'lock' }
      }
    ]
  }
]
